package com.yanqu.road.server.cmd.rank;

import com.yanqu.road.pb.rank.RankProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.rank.RankMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_CROSS_GROUP_WORSHIP, desc = "分组膜拜返回")
public class CrossRankWorshipFromCrossCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        RankProto.CrossGroupWorshipRespMsg respMsg = RankProto.CrossGroupWorshipRespMsg.parseFrom(packet.getBytes());
        RankProto.RankWorshipRespMsg.Builder builder = RankMgr.crossWorshipCallback(player,respMsg);
        player.sendPacket(Protocol.U_RANK_WORSHIP, builder);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
